import requests

headers = {
    "cookie": "sidebarStatus=1; ticket=ST-29e520a5-a09d-4143-9d91-f3b0d1fb7c02; Admin-Token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNzQ0MDMzOTY4LCJ1c2VyX2lkIjo3Njg2LCJ1c2VyX25hbWUiOiJmcmFuay55YW4ifQ.2B3QarTaxdlOC50yzPEbRGsfGdi61cV2ok4gkYMoUoo"
}
session = requests.session()


class Aicapis:

    @staticmethod
    def dc_list(request_data):
        resp = session.post(url=f"http://m.ops.vrviu.com/api/v2/ens/aic",
                            headers=headers, json=request_data)
        if resp.status_code == 200:
            return resp.json()

    @staticmethod
    def v1_vm_list(request_data):
        resp = session.post(url=f"https://cgboss.yuntiancloud.com/api/cginstance/v1/vm/list",
                            headers=headers, json=request_data)
        if resp.status_code == 200:
            return resp.json()

if __name__ == '__main__':
    data = {"page_size":20,"page":1,"account_id":10,"vmids":"","ens_region_id":"dc-qingdao-01"}
    Aicapis.dc_list_()